mod sse;

pub(crate) use sse::sse_handler;

use axum::{Router, routing::get};
use axum::response::{Html, IntoResponse};

const HTML_PATH: &'static str = include_str!("../index.html");

pub fn get_router() -> Router {
    Router::new()
        .route("/", get(index_handler))
        .route("/events", get(sse_handler))
}

async fn index_handler() -> impl IntoResponse {
    Html(HTML_PATH)
}